const express = require('express')
const bodyParder = require('body-parser')

const router = require('./router')

const app = express()

const port = 8888

// view engine setup
app.engine('html', require('express-art-template'))

app.use(bodyParder.urlencoded({extended: false}))
app.use(bodyParder.json())
app.use('/node_modules/', express.static('./node_modules'))
app.use('/public/', express.static('./public'))
app.use(router)

app.listen(port, () => {
  console.log('【棒棒哒~】 server is running...【嘿嘿~~~】');
})